package com.shiku.imserver.common.http;

import com.shiku.imserver.common.packets.ImPacket;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class HttpPacket extends ImPacket {
    private static final long serialVersionUID = 3903186670675671956L;
    protected byte[] body;
    private String headerString;
    private Map<String, Serializable> props = new HashMap();

    public Object getAttribute(String key) {
        return this.props.get(key);
    }

    public Object getAttribute(String key, Serializable defaultValue) {
        Serializable ret = this.props.get(key);
        return ret == null ? defaultValue : ret;
    }

    public void removeAttribute(String key) {
        this.props.remove(key);
    }

    public void setAttribute(String key, Serializable value) {
        this.props.put(key, value);
    }

    public byte[] getBody() {
        return this.body;
    }

    public void setBody(byte[] body2) {
        this.body = body2;
    }

    public String getHeaderString() {
        return this.headerString;
    }

    public void setHeaderString(String headerString2) {
        this.headerString = headerString2;
    }
}
